<template>
  <div class="form-element">
    <div class="col-md-12 padding-0">
      <div class="col-md-12">

        <div class="panel form-element-padding">
          <div class="panel-heading">
            <h4>我的账单</h4>
          </div>


          <el-table
            :data="bills"
          >
            <el-table-column
              label="账单ID"
              prop="billId"
              width="300px"
            ></el-table-column>
            <el-table-column
              label="航班ID"
              prop="flightId"
              width="100px"
            ></el-table-column>
            <el-table-column
              label="付款人"
              prop="name"
              width="100px"
            ></el-table-column>
            <el-table-column
              label="路线"
              prop="route"
              width="200px"
            ></el-table-column>
            <el-table-column
              label="消费日期"
              prop="consumeDate"
              width="200px"
            ></el-table-column>
            <el-table-column
              label="座位类型"
              prop="seatTypeStr"
            ></el-table-column>
            <el-table-column
              label="消费金额"
              prop="price"
            >
            </el-table-column>

          </el-table>

        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      bills: [],
      passenger: {},
    }
  },
  created() {
    const _this = this
    this.passenger = JSON.parse(sessionStorage.getItem('passenger'))
    console.log(this.passenger)
    this.$axios.post('http://localhost:8181/bill/getBills', this.passenger).then((resp) => {
      _this.bills = resp.data
    })
  }
}
</script>

<style scoped>

</style>
